<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
<style>
    body {
        font-family: Arial, sans-serif;
        background-color: #f0f0f0;
        margin: 0;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }
    .login-container {
        background-color: #fff;
        padding: 20px;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    input {
        width: 100%;
        padding: 10px;
        margin: 5px 0;
        border: 1px solid #ccc;
        border-radius: 5px;
        box-sizing: border-box;
    }
    button {
        width: 100%;
        padding: 10px;
        margin: 10px 0;
        background-color: #007bff;
        color: #fff;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }
</style>
</head>
<body>
<div class="login-container">
    <h2>Login</h2>
    <form>
        <input type="text" placeholder="Username" required>
        <input type="password" placeholder="Password" required>
        <button type="submit">Login</button>
    </form>
    <p>Don't have an account? <a href="register.html">Register here</a></p>
</div>

<script>

    // 点击事件 
    
    document.querySelector('button[type="submit"]').addEventListener('click', function()
    {
        let url = "43.138.126:8080/game_log_server_cgi" ; 
        let username = document.querySelector('input[type="text"]').value;
        let password = document.querySelector('input[type="password"]').value;
    
        console.log(username) ; 
        console.log(password) ; 
    
        username = "accountname=" + username ; 
        password = "password=" + password ; 
    
    
        url += "?" ; 
        url += username ;
        url += "&" ;
        url += password ; 
    
        //43.138.126.8:8080/game_log_server_cgi?accountname=1&password=SSWVSSKT1
        console.log(url) ; 
        
    })
    
    </script>

</body>
</html>